<?php

class Pet_model extends Model {

    function Pet_model()
    {
        parent::Model();

        // Load database
        $this->load->database();

        // Formulate Queries
        $query = sprintf("SELECT * FROM Pet");
        $query2 = sprintf("SELECT * FROM MorePhotos");

        // Perform Queries
        $result = mysql_query($query);
        $result2 = mysql_query($query2);
    }

        function Frontpage_info(){

        $row = mysql_fetch_row($result);
        echo $row[2]; //name
        echo $row[4]; //description
        echo $row[5]; //note

    }

    function Print_picture()
    {
    // Use result
    $row = mysql_fetch_row($result);

    echo $row[3]; // picture value
    }

    function Print_info()
    {
    // Use result
    $row = mysql_fetch_row($result);

    echo $row[2]; // name
    echo $row[4]; // description
    echo $row[5]; // notes
    echo $row[6]; // species
    echo $row[7]; // breed
    }

    function Print_more_pictures()
    {
    // Use result
    $row = mysql_fetch_row($result2);

    echo $row[3]; // picture value
    }
}

?>